<template>
  <div class="general">
    <div class="general_item">
      <div class="label">
        <div class="title">{{languageJson.setting.language}}</div>
        <div class="tips">{{languageJson.message.reload}}</div>
      </div>
      <div>
        <el-select
          popper-class="select_popper_border0"
          v-model="state.formData.general.language"
          :placeholder="languageJson.setting.language"
          style="width: 200px"
          @change="settingtore.changelanguage"
        >
          <el-option
            v-for="item in state.languageList"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </div>
    </div>
    <div class="general_item">
      <div class="label">
        <div class="title">{{languageJson.setting.timeZone}}</div>
        <div class="tips">{{languageJson.message.reload}}</div>
      </div>
      <div>
        <el-select
          popper-class="select_popper_border0"
          v-model="state.formData.general.timezone.country"
          @change="settingtore.changeimezonecountry"
          :placeholder="languageJson.setting.timeZone"
          style="width: 200px"
        >
          <el-option
            v-for="item in state.timezone"
            :key="item.country"
            :label="item.country_zh"
            :value="item.country"
          />
        </el-select>
      </div>
    </div>
    <div class="general_item">
      <div class="label">
        <div class="title">{{languageJson.setting.oddType}}</div>
      </div>
      <div>
        <el-select
          popper-class="select_popper_border0"
          v-model="state.formData.general.odds_type"
          @change="settingtore.changeformData"
          :placeholder="languageJson.setting.oddType"
          style="width: 200px"
        >
          <el-option
            v-for="item in state.oddstypeList"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </div>
    </div>
  </div>
</template>

<script setup>
const userStore = useUserStore()
const languageJson = inject('languageJson')
const languageType = inject('languageType')
const { settingtore, state } = inject('SettingStore')
</script>

<style lang="scss" scoped>
.general {
  display: flex;
  flex-direction: column;

  .general_item {
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;

    .label {
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;

      .title {
        font-family: AlibabaPuHuiTi_2_65_;
        font-size: 14px;
        font-weight: 500;
        color: #000;
      }

      .tips {
        font-family: AlibabaPuHuiTi_2_65_;
        font-size: 12px;
        color: #999;
        margin-top: 4px;
      }
    }
  }
}
</style>